<?php
/**
 * Created by PhpStorm.
 * User: 24369
 * Date: 2021/6/26
 * Time: 11:22
 */
namespace app\admin\logic;

use app\admin\validate\AdminValidate;
use think\exception\ValidateException;
use think\facade\Request;

class AdminLogic
{
    public static function getAdminDate($scene)
    {
        $post=Request::post();
        $msg='';
        try{
            validate(AdminValidate::class)->scene($scene)->check($post);
        }catch (ValidateException $validateException){
            $msg=$validateException->getMessage();
        }
        return  [$msg,$post];
    }
}